In web-based applications there are three layers of processing; the user interface, business logic, and data processing layers. The user interface layer consists of a set of items displayed to the user that can be read-only, such as labels or fixed values; read-write, as in form values or check boxes; or write-only, as in buttons. The data processing layer integrates the application layer with the either stored information or external systems. The business logic layer is the glue that binds these other two layers, translating requests from the data processing layer to information that can be displayed to a user, or vice versa. These applications are embedded on one or more computers.
User interface (UI) components are event driven. An action associated with the components can be triggered either through direct user action, a response from the business logic to an external request or an earlier action from a user interface component, or from a timer. In complex systems, it is important to be able to test each layer independently. But drivers to do so may be challenging. For instance, a user interface action may only occur in response to a rarely-seen hardware failure.
In response to this, engineers have devised complex processes that simulate events. This requires significant changes to the production application to know when it is under test. For example, a tester needs to trigger obscure states inside the UI that may require multiple server side events to get to that state. For this to occur, production application code must be aware of this testing and requires test code to be embedded. Hence, test procedures, frameworks, cases, suites and runners must be defined ahead of time and built into or hooks made available to production code. Often this means production code has test flags, switches and circuit breakers embedded therein.
The figures are provided in order to provide a thorough understanding of the present invention. The figures should not be construed as limiting the breath of the invention in any manner.